#pragma once

#include <iostream>
#include <sys/fcntl.h>
#include <unistd.h>
void SetNonBlock(int fd)
{
    int fl = ::fcntl(fd, F_GETFL);
    if (fl < 0)
    {
        std::cout << "fcntl error" << std::endl;
        return;
    }
    ::fcntl(fd, F_SETFL, fl | O_NONBLOCK);
}
enum
{
    DEBUG = 1,
    INFO,
    WARNING,
    ERROR,
    FATAL,
    SOCKET_ERROR,
    BIND_ERROR,
    LISTEN_ERR,
    EPOLL_CREAT_ERROR,
    EPOLL_ADD_ERROR

};